<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改密码</title>
<link href="../style/css_member.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
<script type="text/javascript">

function checkForm(){

	  var original_pwd = $("#original_pwd").val();
	  var pwd = $("#pwd").val();
	  var pwd_repeat = $("#pwd_repeat").val();

	  if( original_pwd  ==  "" ){
		  $("#original_pwd").focus();
		  alert("请填写原密码。");
		  return false;
	  }

	  if( pwd  ==  ""){
		  $("#pwd").focus();
		  alert("请填写密码。");
		  return false;
	  }
	  
	  if( pwd_repeat  ==  ""){
		  $("#pwd_repeat").focus();
		  alert("请填写确认密码。");
		  return false;
	  }

	  if( pwd != pwd_repeat){
		  $("#pwd").val("");
		  $("#pwd_repeat").val("");
		  $("#pwd").focus();
		  alert("两次输入的密码不一致。");
		  return false;
	  }

	  $("#registerForm").submit();
}
</script>
<style type="text/css">
.message {
	font-family: 宋体;
	font-size: 16px;
	color: red;
	list-style: none;
	margin: 0;
	padding: 0;
}

.message li {
	margin: 0;
	padding-left: 30px;
}
</style>

</head>
<body>
<!-- 页面头部  -->
<jsp:include page="/commons/head_member.jsp"></jsp:include>

<form action="${ctx }/member/changePwd.do" method="post" id="registerForm" name="registerForm">
  <table width="960" cellspacing="10" cellpadding="0" class="tbl_border" align="center" style="font-family: 宋体;font-size: 14px;color: #666666;">
	<tr>
		<td width="35%"></td><td><s:actionmessage cssClass="message" theme="simple" /></td>
	</tr>
	<tr>
		<td></td>
		<td height="30"><b style="color: #D20404;">修改密码</b></td>
	</tr>
	<tr>
		<td align="right">原密码：</td>
		<td><input name="original_pwd" id="original_pwd" value=""
			type="password" /></td>
	</tr>
	<tr>
		<td align="right">新密码：</td>
		<td><input name="pwd" id="pwd" value="" type="password" /></td>
	</tr>
	<tr>
		<td align="right">确认密码：</td>
		<td><input name="pwd_repeat" id="pwd_repeat" value=""
			type="password" /></td>
	</tr>
	<tr>
		<td><input name="userInfo.id"
			value="${ sessionScope.userinfo.id}" type="hidden" /></td>
		<td><input type="button" class="btn_2" value="提交" onclick="checkForm()" /></td>
	</tr>
</table>
</form>

<jsp:include page="/commons/foot_member.jsp"></jsp:include>

</body>
</html>